<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <!--移动端的缩放比例-->
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <!--引用semantic ui中cdn的css样式-->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css"
        style="user-select: auto;">
  <!--引入css-->
  <link rel="stylesheet" href="../../static/css/me.css">
  <!--引入md的css-->
  <link rel="stylesheet" href="../../static/lib/editormd/css/editormd.min.css">
  <title>博客发布</title>

</head>
<body>


<!--======================导航======================-->
<nav class="ui inverted attached segment me-tp-mini me-shadow-small">
  <!--ui是一种写法  inverted反色,底色  attached没有圆角贴在上面  segment是一个片段-->
  <div class="ui container"> <!--container是一个容器-->
    <div class="ui secondary inverted stackable menu"> <!--让每一个a标签之间没有白线 stackable在手机端是可堆叠的-->
      <!--======================左侧导航栏======================-->
      <h2 class="ui teal header item">管理管理</h2> <!--teal一种蓝色 header放在头部  item代表menu里面的每一个条目-->
      <a href="#" class="item me-mobile-hide my-item active"><i class="mini home icon"></i>&nbsp;博客</a>
      <!--都在官网的icon中-->
      <a href="#" class="item me-mobile-hide my-item"><i class="mini idea icon"></i>分类</a>
      <a href="#" class="item me-mobile-hide my-item "><i class="mini tags icon"></i>&nbsp;&nbsp;标签</a>

      <!--======================右侧导航栏======================-->
      <div class="right menu my-item me-mobile-hide">
        <div class="item">
          <div class="ui dropdown item">
            <div class="text">
              <img src="../../static/images/11.jpg" alt="" class="ui avatar image">
              lyf
            </div>
            <i class="dropdown icon"></i>
            <div class="menu">
              <a href="#" class="item">注销</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
  <a href="#" class="ui black icon button me-top-right me-moblie-show" id="show">
    <i class="sidebar icon"></i>
  </a>
</nav>
<!--二级导航-->
<div class="ui attached pointing menu">
  <div class="ui container">
    <div class="right menu">
      <a href="#" class="item">发布</a>
      <a href="#" class="item teal active">列表</a>
    </div>
  </div>
</div>

<!--中间内容-->
<div class="me-ft-large me-container">
  <div class="ui container">
    <form action="#" class="ui form" method="post">
      <div class="required field"><!--required要求输入,不输入就会显示红色的框-->
        <div class="ui left labeled input">
          <div class="ui selection teal basic dropdown label compact"><!--compact适应文本-->
            <input type="hidden" value="原创">
            <i class="dropdown icon"></i>
            <div class=" text">原创</div>
            <div class="menu">
              <div class="item" data-value="原创">原创</div>
              <div class="item" data-value="转载">转载</div>
              <div class="item" data-value="翻译">翻译</div>
            </div>
          </div>
          <input type="text" placeholder="标题" name="title">
        </div>
      </div>

      <div class="field">
        <div id="md-content"  style="z-index: 1 !important;">
          <textarea name="content" placeholder="博客内容...." style="display: none">
            [TOC]

#### Disabled options

- TeX (Based on KaTeX);
- Emoji;
- Task lists;
- HTML tags decode;
- Flowchart and Sequence Diagram;

#### Editor.md directory
          </textarea>
        </div>
      </div>

      <div class="two fields">
        <div class="field">
          <div class="ui left labeled action input"><!--action消除圆角-->
            <label class="ui compact teal basic label">分类</label><!--compact紧缩的-->
            <div class="ui fluid selection dropdown "><!--fluid充满整个标签-->
              <input type="hidden" name="type">
              <i class="dropdown icon"></i>
              <div class="default text">分类</div>
              <div class="menu">
                <div class="item" data-value="1">错误日志</div>
                <div class="item" data-value="2">开发者手册</div>
                <div class="item" data-value="3">常见bug</div>
                <div class="item" data-value="4">日常经历</div>
                <div class="item" data-value="5">美文欣赏</div>
              </div>
            </div>
          </div>
        </div>
        <div class="field">
          <div class="ui left labeled action input"><!--action消除圆角-->
            <label class="ui compact teal basic label">标签</label><!--compact紧缩的-->
            <div class="ui selection dropdown fluid search multiple "><!--fluid充满整个标签 search可以搜索 multiple可以添加多个-->
              <input type="hidden" name="tag">
              <i class="dropdown icon"></i>
              <div class="default text">标签</div>
              <div class="menu">
                <div class="item" data-value="1">Java</div>
                <div class="item" data-value="2">MYSQL</div>
                <div class="item" data-value="3">SSM</div>
                <div class="item" data-value="4">HTML</div>
                <div class="item" data-value="5">JavaScript</div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="field">
        <div class="ui left labeled input">
          <label class="ui label teal basic">首图</label>
          <input type="text" name="indexPicture" placeholder="首图引用地址">
        </div>
      </div>

      <div class="inline fields">
        <div class="field ">
          <div class="ui checkbox">
            <input type="checkbox" id="recommed" name="recommed" checked class="hidden "><!--checked默认选中-->
            <label for="recommed">推荐</label>
          </div>
        </div>
        <div class="field">
          <div class="ui checkbox">
            <input type="checkbox" id="shareInfo" name="shareInfo" class="hidden">
            <label for="shareInfo">分享</label>
          </div>
        </div>
        <div class="field">
          <div class="ui checkbox">
            <input type="checkbox" id="appreciation" name="appreciation" class="hidden">
            <label for="appreciation">赞赏</label>
          </div>
        </div>
        <div class="field">
          <div class="ui checkbox">
            <input type="checkbox" id="commet" name="commet" class="hidden">
            <label for="commet">评论</label>
          </div>
        </div>
      </div>

      <div class="ui error message"></div><!--错误信息默认会显示在这里-->

      <div class="ui right aligned container">
        <button type="button" class="ui button" onclick="window.history.go(-1)">返回</button>
        <button class="ui secondary button">保存</button>
        <button class="ui teal button">发布</button>
      </div>
    </form>
  </div>
</div>


<br>
<!--======================底部footer======================-->
<footer class="ui inverted attached segment me-ft-massive" style="height: 240px;">
  <div class="ui center aligned container"><!--center aligned 让里面的字体居中 container是一个容器带响应式效果-->
    <div class="ui inverted divided stackable grid"> <!--divided? grid相当于栅格,是一种布局16份-->
      <div class="three wide column"><!--three三个宽度 column一列-->
        <div class="ui inverted link list">
          <div class="item">
            <img src="../../static/images/lyf.png" class="ui rounded image" alt="" style="width: 110px;">
            <!--rounded圆角 image图片-->
          </div>
        </div>
      </div>
      <div class="three wide column"><!--three三个宽度 column一列-->
        <h4 class="ui inverted header  me-ft-thin me-ft-spaced">最新博客</h4>
        <div class="ui inverted link list"><!--竖着的列表-->
          <a href="#" class="item">用户故事(User Stroy)</a>
          <a href="#" class="item">刻意练习</a>
          <a href="#" class="item">失败要趁早</a>
        </div>
      </div>
      <div class="three wide column"><!--three三个宽度 column一列-->
        <h4 class="ui inverted header me-ft-thin me-ft-spaced">联系我</h4>
        <div class="ui inverted link list">
          <a href="#" class="item">Email:2083298549@qq.com</a>
          <a href="#" class="item">QQ:2083298549</a>
          <a href="#" class="item">Phone:15993596769</a>
        </div>
      </div>
      <div class="seven wide column">
        <h4 class="ui inverted header me-ft-thin me-ft-spaced ">Blog</h4>
        <div class="ui inverted link list">
          <p class="me-ft-thin me-ft-spaced me-ft-opacity-mini">
            这是我的个人博客,会分享一些关于编程,学习,思考相关的经验,希望可以对每一个来到这里的朋友有所帮助!!!!</p>
        </div>
      </div>
    </div>
  </div>

  <!--线-->
  <div class="ui inverted sectioin divider"></div><!--divider代表分割线-->
  <p class="ui center aligned container me-ft-thin me-ft-spaced me-ft-opacity-tiny">Copyright @ 2019 - 2020 Blog
    Designed by Lirenmi</p>
</footer>

<!--<script src="https://cdn.jsdelivr.net/npm/jquery@3.2/dist/jquery.min.js"></script>-->
<script src="../../static/js/jquery-2.2.4.min.js"></script>
<!--引用semantic UI中cdn的js-->
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js" style="user-select: auto;"></script>
<!--引入md的js-->
<script src="../../static/lib/editormd/editormd.min.js"></script>

<script>

  var contentEditor;

  $(function () {
    contentEditor = editormd("md-content", {
      width   : "100%",
      height  : 640,
      syncScrolling: "single",
      path    : "../../static/lib/editormd/lib/"
    });
  });


  $("#show").click(function () {
    $(".my-item").toggleClass("me-mobile-hide");
  });

  $(".ui.dropdown").dropdown({
    on: "hover"
  });/*重新更新下拉菜单*/

  $(".ui.form").form({
    fields: {/*每一个区域*/
      title: {/*title区域*/
        identifier: "title",/*和表单中的name值一样*/
        rules: [{/*制定规则*/
          type: "empty",/*非空验证*/
          prompt: "标题为空,请输入博客标题"/*提示的内容*/
        }]
      }
    }
  });

</script>
</body>
</html>